#ifndef __LOG_H__
#define __LOG_H__

enum {
  BUFFERING,
  LOGGING,
  PROXYING,
  PRELOGGING
};

typedef struct {
  char name[1024];
  char buffer[5];
  int bufferIndex;
  int status;
  FILE *logFile;
} Log;

void LOG_flush(Log *context);
Log * LOG_init(int client, int server, int postOnly);
void LOG_log(Log *context, char* buf, int length);

#endif
